package com.fancon.android.gardenjokesx.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;

import com.fancon.android.gardenjokesx.R;

public class IgRotateAnimationView extends ImageView {
	public IgRotateAnimationView(Context paramContext) {
		super(paramContext);
	}

	public IgRotateAnimationView(Context paramContext,
			AttributeSet paramAttributeSet) {
		super(paramContext, paramAttributeSet);
	}

	public IgRotateAnimationView(Context paramContext,
			AttributeSet paramAttributeSet, int paramInt) {
		super(paramContext, paramAttributeSet, paramInt);
	}

	protected void onAttachedToWindow() {
		super.onAttachedToWindow();
		Animation localAnimation = AnimationUtils.loadAnimation(getContext(),
				R.anim.rotate_spinner);
		localAnimation.reset();
		startAnimation(localAnimation);
	}

	protected void onDetachedFromWindow() {
		super.onDetachedFromWindow();
		clearAnimation();
	}
}